<template>
	<view class="mainpadding" v-if="pageShow">
		<template v-if="type==5"><u-parse :content="content"></u-parse></template>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				content: "",
				type: "",
				pageShow: false
			}
		},
		onLoad(options) {
			let type = options.type
			this.type = type
			if (type == 1) this.settitle("用户协议")
			if (type == 2) this.settitle("隐私政策")
			if (type == 4) this.settitle("关于我们")
			if (type == 5) this.settitle("邀请规则")
			this.system()
		},
		methods: {
			settitle(val) {
				uni.setNavigationBarTitle({
					title: val
				})
			},
			system() {
				httpRequest.request('/api/index/getConfigInfoItem', 'POST', {
					pidtype:'about_set',
					type:"yqgz"
				}).then(res => {
					this.content = res.data
					this.pageShow = true
				})
			}
		}
	}
</script>

<style>

</style>